package hy.controller;

import a.Person;
import hy.beans.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;


@RestController
public class TestCtrl {
    @Autowired
    Person p;

    @Autowired
    Environment e;

    @Autowired
    Emp emp;

    @RequestMapping("/getp")
    public Person getP(){
        System.out.println(e.getProperty("person.name")+"---"+e.getProperty("person.birth"));
        System.out.println(emp);
        ArrayList arr;
        return p;
    }
}
